-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Run diagnostics API UI integration for system VMs and VR #2833
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@blueorangutan package |
|
@dhlaluku a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-2281 |
|
@blueorangutan test |
|
@dhlaluku a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-2981)
|
| @Override | ||
| public String getEventType() { | ||
| VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getId()); | ||
| if (vm.getType() == VirtualMachine.Type.ConsoleProxy) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it would be better to use a switch case instead of multiple if else, especially for comparing multiple enums
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactored to switch-case statements
ui/l10n/en.js
Outdated
| "label.rules":"Rules", | ||
| "label.run.diagnostics.type":"Type", | ||
| "label.run.diagnostics.destination":"Destination", | ||
| "label.run.diagnostics.extra":"Extra Args", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Spelling out the entire word looks more professional. Maybe just call it 'Arguments'?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed Extra Args -> Extra Arguments
api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java
Show resolved
Hide resolved
rohityadavcloud
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See minor comments
| private NetworkOrchestrationService networkManager; | ||
|
|
||
| @Override | ||
| @ActionEvent(eventType = "", eventDescription = "running diagnostics on system vm", async = true) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dhlaluku eventType is empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a new event type "EVENT_SYSTEM_VM_DIAGNOSTICS = SYSTEM.VM.DIAGNOSTICS" and used that.
Notices that most system vm actions (reboot, destroy and so on) also have empty event types.
|
LGTM |
borisstoyanov
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGMT
Description
This is a UI integration of the runDiagnostics API command that helps Admins troubleshoot network issues on CloudStack hosted networks by executing network-utility commands (ping, traceroute, arping) remotely on system VMs. #2721
FS: https://cwiki.apache.org/confluence/display/CLOUDSTACK/CloudStack+Remote+Diagnostics+API
Types of changes
GitHub Issue/PRs
Screenshots (if appropriate):
Output

How Has This Been Tested?
As admin, log on to the CloudStack UI;
Navigate to Infrastructure > System VMs or Virtual Router
Click on the Run Diagnostics button and fill in the form that pops up.
See screenshots
Checklist:
Testing